<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
$ngay=array('01','02','03','04','05','06','07','08','09','10','11','12','13','14','15',
'16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31');
$thang=array('01','02','03','04','05','06','07','08','09','10','11','12');
$gioitinh=array('Male','Female');
$nam=array(
           '2000','2001','2002','2003','2004','2005','2006','2007','2008','2009',
           '2010','2011','2012','2013','2014','2015','2016','2017','2018','2019');
?>
<form action="<?php echo base_url()?>salary/index" name="formLoadSakary" method="POST" >
    <table class="tablebg" cellspacing="1" align="right" width="900px" border="0">
        <tr>
            <td class="row1" align="left">
            From Date
        </td>
        <td class="row2" align="left">
            <select name="txtDayFrom">
                <?php
                                   foreach($ngay as $item){
                                     $Day=$_POST['txtDayFrom'];
                                     if($item == $Day)
                                     echo "<option selected>$item</option>";
                                     else echo "<option>$item</option>";
                                   }
                      ?>
            </select>
            <select name="txtMonthFrom">
                <?php
                                   foreach($thang as $item){
                                     if($item == $Month)
                                     echo "<option selected>$item</option>";
                                     else echo "<option>$item</option>";
                                   }
                      ?>
            </select>
            <select name="txtYearFrom">
                <?php
                                   foreach($nam as $item){
                                     if($item == $Year)
                                     echo "<option selected>$item</option>";
                                     else echo "<option>$item</option>";
                                   }
                      ?>
            </select>
        </td>
        </tr>
        <tr>
            <td colspan="2"></td>
        </tr>
        <tr>
            <td class="row1" align="left">
            To Date
        </td>
        <td class="row2" align="left">
            <select name="txtDayTo">
                <?php
                                   foreach($ngay as $item){
                                     if($item == $Day)
                                     echo "<option selected>$item</option>";
                                     else echo "<option>$item</option>";
                                   }
                      ?>
            </select>
            <select name="txtMonthTo">
                <?php
                                   foreach($thang as $item){
                                     if($item == $Month)
                                     echo "<option selected>$item</option>";
                                     else echo "<option>$item</option>";
                                   }
                      ?>
            </select>
            <select name="txtYearTo">
                <?php
                                   foreach($nam as $item){
                                     if($item == $Year)
                                     echo "<option selected>$item</option>";
                                     else echo "<option>$item</option>";
                                   }
                      ?>
            </select>
        </td>
        </tr>
        <tr>
            <td colspan="2"></td>
        </tr>
        <tr>
            
            <td class="row1" align="right"><input type="submit" name="search" id="submit" value="Search"></td>
            <td class="row1" align="left"><input type="reset" name="Reset" id="submit" value="Reset"></td>
    
        </tr>
    </table>
</form>
